﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<Style x:Key="ButtonStyle" TargetType="Button">
		<Setter Property="Width" Value="NaN" />
		<Setter Property="MinWidth" Value="75" />
		<Setter Property="Height" Value="23" />
		<Setter Property="Padding" Value="5,0" />
		<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
		<Setter Property="FontSize" Value="12" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="HorizontalContentAlignment" Value="Center" />
		<Setter Property="VerticalContentAlignment" Value="Center" />
		<Setter Property="Background" Value="{DynamicResource ButtonNormalBackground}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Border x:Name="Border" BorderThickness="{TemplateBinding BorderThickness}"
							Background="{TemplateBinding Background}" BorderBrush="{DynamicResource ButtonNormalBorder}"
							Padding="{TemplateBinding Padding}">
						<ContentPresenter Margin="2,0"
								HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
								VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
								RecognizesAccessKey="True" />
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsDefault" Value="True">
							<Trigger.Setters>
								<Setter TargetName="Border" Property="BorderBrush"
										Value="{DynamicResource ButtonDefaultBorder}" />
								<Setter TargetName="Border" Property="Background"
										Value="{DynamicResource ButtonMouseOverBackground}" />
							</Trigger.Setters>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="Background" TargetName="Border"
									Value="{DynamicResource ButtonMouseOverBackground}" />
							<Setter Property="BorderBrush" TargetName="Border"
									Value="{DynamicResource ButtonMouseOverBorder}" />
						</Trigger>
						<Trigger Property="IsPressed" Value="True">
							<Setter Property="Background" TargetName="Border"
									Value="{DynamicResource ButtonPressedBackground}" />
							<Setter Property="BorderBrush" TargetName="Border"
									Value="{DynamicResource ButtonPressedBorder}" />
						</Trigger>
						<Trigger Property="IsEnabled" Value="False">
							<Trigger.Setters>
								<Setter Property="Foreground" Value="#535353" />
								<Setter TargetName="Border" Property="Background" Value="#EFEFEF" />
								<Setter TargetName="Border" Property="BorderBrush" Value="#D9D9D9" />
							</Trigger.Setters>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="RibbonCommandsButton" TargetType="Button">
		<Setter Property="HorizontalAlignment" Value="Right" />
		<Setter Property="VerticalAlignment" Value="Bottom" />
		<Setter Property="Grid.Row" Value="1" />
		<Setter Property="Focusable" Value="False" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Grid>
						<Border x:Name="Border" Background="Transparent">
							<ContentPresenter />
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="Background" TargetName="Border"
									Value="{DynamicResource ButtonMouseOverBackground}" />
						</Trigger>
						<Trigger Property="IsPressed" Value="True">
							<Setter Property="Background" TargetName="Border"
									Value="{DynamicResource ButtonPressedBackground}" />
						</Trigger>
						<Trigger Property="IsEnabled" Value="False">
							<Trigger.Setters>
								<Setter Property="Foreground" Value="#535353" />
								<Setter TargetName="Border" Property="Background" Value="#EFEFEF" />
							</Trigger.Setters>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style TargetType="Button" x:Key="LinkText">
		<Setter Property="Padding" Value="5" />
		<Setter Property="Cursor" Value="Hand" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Border Background="Transparent" Padding="{TemplateBinding Padding}">
						<TextBlock x:Name="text"
								Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="TextDecorations" TargetName="text" Value="Underline" />
							<Setter Property="Opacity" TargetName="text" Value="0.8" />
						</Trigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter Property="Foreground" TargetName="text" Value="#50000000" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}" />
</ResourceDictionary>